Skip to content

Conversation

@sgindeed
Copy link
Contributor

@sgindeed sgindeed commented Oct 8, 2025

This PR adds a new R script unique.letters.count.R under the string_manipulation directory.
The program prompts the user for a string, cleans it by removing non-letter characters, converts it to lowercase, and counts the occurrences of each unique letter.

Additionally, it includes minor refactoring for clarity and efficiency as per review suggestions.

  1. Prompts the user to enter a string.
  2. Removes all non-letter characters (e.g., numbers, punctuation, symbols).
  3. Converts text to lowercase for case-insensitive counting.
  4. Splits the cleaned string into individual letters.
  5. Identifies and counts occurrences of each unique letter.
  6. Displays the result in a simple, readable format.
  7. Uses dot notation (clean.string, unique.letters, etc.) for consistency with R naming conventions.

@sgindeed sgindeed requested review from acylam and siriak as code owners October 8, 2025 04:29
Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit d408fea into TheAlgorithms:master Oct 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants